package com.wtwd.device.constant;

import com.wtwd.common.exceptionhanding.BizExceptionAssert;

/**
 * 返回状态码枚举
 */
public enum RespCode implements BizExceptionAssert {

    SUCCESS(0, "成功")//成功
    ,FAIL(1,"失败")

    ,PARAMS_ERROR(400, "参数错误")
    //app用户
    ,AUTH_CODE_EXIST(1000, "验证码已发送,请注意查收")
    ,AUTH_CODE_ERROR(1001, "验证码错误")
    ,PHONE_FORMAT_ERROR(1002, "手机号格式错误")
    ,PHONE_EXIST(1003, "手机号已存在")
    ,EMAIL_EXIST(1004, "邮箱已存在")
    ,PHONE_NOT_EXIST(1005, "手机号不存在")
    ,ACCOUNT_PASSWORD_ERROR(1006, "账号或密码错误")
    ,PASSWORD_FORMAT_ERROR(1007, "密码格式错误")
    ,ACCOUNT_NOT_EXIST(1008, "账号不存在")
    ,EMAIL_NOT_EXIST(1009, "邮箱不存在")
    ,EMAIL_FORMAT_ERROR(1010, "邮箱格式错误")


    ,SMS_SEND_ERROR(1011,"短信发送错误")
    ,NONSUPPORT_PHONE(1012,"不支持该手机号")
    ,PHONE_COUNT_LIMIT(1013,"该手机号发送频次过高")
    ,PHONE_DAY_COUNT_LIMIT(1014,"发送频次过高已限额,请明日再试")

    ,WEATHER_NOT_GET(2001,"未获取到该城市天气信息")
    ,ALREADY_BIND_DEVICE(3001,"该设备已经被别的用户绑定")
    ,ALREADY_BIND_DEVICE_IS_APP_USER(3002,"该用户已经绑定设备,请解绑后重新绑定")
    ,ALREADY_BIND_DEVICE_APP_USER(3004,"该用户已经绑定该设备,如需重新绑定,请解绑")
    ,DEVICE_NOT_BOUND(3005,"该设备未被用户绑定，或已解绑")
    ,DEVICE_NOT_USER(3006,"该设备不属于该用户")
    ,WEB_NOP_RECORD(4001,"请先在web端平台入库")
    ,TODAYS_DATA_ALREADY_EXIST(5001,"今天的数据已经入库")
    ,FRIEND_APPLY_STATE(6001,"该好友处于申请状态")
    ,ALREADY_GOOD_FRIENDS(6002,"该好友已经是您的好友")
    ,UNINITIALIZED_APP_USER_INFO(6003,"尚未初始化用户信息")
    ,UNIDENTIFICATION_USER(6004,"该用户尚未识别,请检查二维码")
    ,NOT_FRIEND(6005,"双方并不是好友关系")
    ,NOT_APP_VERSION(6006,"无app最新版本")
    ,SYNCHRONOUS_FRIEND_FAIL(6007,"同步好友信息失败")
    ,APP_NOT_INITIALIZE(6008,"请先在WEB平台添加此app")
    ,NOT_CLIENT_TYPE(6009,"未获取到对方客户端类型")
    ,USER_EXCEPTION(6010,"用户信息映射异常")
    ,USER_NOT_CLIENTID(6011,"尚未获取到该用户的clientId")
    ,AlARM_REPEAT(7000,"已存在此类型闹钟")
    ;


    private int code;
    private String msg;

    RespCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
